#include <stdio.h>
#include <CL/cl.h>

int main()
{
	    FILE* file = fopen("icd.txt", "w");
	        cl_uint numPlatforms;
		    cl_platform_id platforms[10];
		        char name[1024];
			    cl_uint i;

			        clGetPlatformIDs(10, platforms, &numPlatforms);

				    fprintf(file, "%d\n", numPlatforms);

				        for (i = 0; i < numPlatforms; ++i)
						    {
							            clGetPlatformInfo(platforms[i], CL_PLATFORM_NAME, 1024, name, NULL);

								            fprintf(file, "%s\n", name);
									        }

					    return 0;
}

